package com.zyong.design.pattern.mediator.case2;

/**
 * 闹钟
 * @program: zyong-design-pattern
 * @ClassName: Alarm
 * @author: zyong
 * @create: 2024-04-04 08:56
 */
public class Alarm extends AbstractColleague {
    public Alarm(Mediator mediator, String name) {
        super(mediator, name);
    }

    @Override
    public void sendMessage(int stateChange) {
        getMediator().getMessage(stateChange, name);
    }

    public void sendAlarm(int stateChange) {
        sendMessage(stateChange);
    }
}
